<template>
  <el-form ref="form" :model="form" label-width="80px">
    <el-form-item label="用户ID">
      ????
    </el-form-item>
    <el-form-item label="用户昵称">
      <el-input v-model="user.name"></el-input>
    </el-form-item>
    <el-form-item label="个性签名">
      <el-input type="textarea" v-model="user.email"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">修改</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
  export default {
    props: {
      user: {
        type: Object,
        default: () => {
          return {
            name: '',
            email: '',
            avatar: '',
            role: ''
          }
        }
      }
    },
    data() {
      return {
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        }
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>

<style>
</style>
